﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CLEXA.SurfaceClient.ViewModel
{
    public class TableVM : VMBase
    {
        private readonly string catalog;
        private readonly string schema;
        private readonly string name;
        private readonly IReadOnlyCollection<ColumnVM> columns;

        public string Catalog
        {
            get { return catalog; }
        }

        public string Schema
        {
            get { return schema; }
        } 

        public string Name
        {
            get { return name; }
        }

        public IReadOnlyCollection<ColumnVM> Columns
        {
            get { return columns; }
        } 

        public TableVM(string catalog, string schema, string name, IEnumerable<ColumnVM> columns)
        {
            this.catalog = catalog;
            this.schema = schema;
            this.name = name;
            this.columns = new ReadOnlyCollection<ColumnVM>(columns.ToList());
        }
    }
}
